home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: artemis.sto.fdata.se!news
- From: Niklas Mellin <niklas.mellin@sto.fdata.se>
- Subject: Is this code valid?
- Sender: news@artemis.sto.fdata.se (UseNet NetNews)
- Message-ID: <30F3E42D.74BA@sto.fdata.se>
- Date: Wed, 10 Jan 1996 16:07:09 GMT
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
- Mime-Version: 1.0
- X-Mailer: Mozilla 2.0b4 (WinNT; I)
- Organization: WM-data F÷rsvarsdata AB, Sweden
-
- class X
- {
- public:
- class Y;
- };
-
- class X::Y
- {
- };
-
- int main(int, char* [])
- {
- throw X::Y();
- return 0;
- }
-
- It doesn't matter if the throw statement is in main or in some
- other function, and it makes no difference if there is a catch
- statement.
-
- When linking the code above in Borland C++ 4.0 the ide crashes
- killing windows too (it took me a while to isolate the problem).
-
- Borland 4.5 doesn't crash but reports: "Internal error..." some
- number.
-
- My question: Is it allowed to throw objects of nested classes?
-
- ---
- Niklas Mellin
-